package day10;

import java.util.Scanner;

public class Practice {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个字符串：");
//        String str=sc.next();
//        String[] strings=str.split("");
//        System.out.println("请输入要查找的字符：");
//        String str2=sc.next();
//        int count=0;
//        for(String s:strings){
//            if(s.equals(str2))
//                count++;
//        }
//        System.out.println(str+"中包括"+count+"个"+str2);
        String inputStr = sc.next().trim().replace(" ", "");
        System.out.println("请输入一个字符");
        char c = sc.next().charAt(0);
        char[] chars = inputStr.toCharArray();
        for (char ch : chars) {
            int count = 0;
            if (ch == c) {
                count++;
            }
        }
    }
}
